package com.r_z.result;



import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

/**
 * @author 任俊杰
 * @version 1.0
 * @date 2023-05-29
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> {
    private String code;
    private String msg;
    private int count;
    private T[] data;
    private Map map;
    private T t;

    public CommonResult(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public CommonResult(String code, String msg, int count, T[] data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public CommonResult(String code, String msg, int count, T[] data, Map map){
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
        this.map = map;
    }

    public CommonResult(String code, String msg, int count, T t) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.t = t;
    }
}
